package com.example.feign;

import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Component;

import com.example.entry.User;

@Component
public class FeignClientFallback implements FeignEureKaClient {

	@Override
	public String helloService() {
		return "这是Hystrix Fallback返回的数据";
	}

	@Override
	public User getUser(int id) {
		return new User(id, "这是Hystrix Fallback返回的数据", 0, 0);
	}

	@Override
	public List<User> getList() {
		return new ArrayList<>();
	}

	@Override
	public User addUser(User user) {
		return new User(0, "这是Hystrix Fallback返回的数据", 0, 0);
	}

}
